Skip to content

fix ifdefs for non-windows systems without long double #5840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix ifdefs for non-windows systems without long double #5840

wants to merge 1 commit into from

Conversation

chuckadams
Copy link
Contributor

@chuckadams chuckadams commented Jul 11, 2020

In ext/c/ffi.c, there is an #ifdef on line 70:

#ifdef HAVE_LONG_DOUBLE
	ZEND_FFI_TYPE_LONGDOUBLE,
#endif

Then later on line 315:

#ifndef PHP_WIN32
	case ZEND_FFI_TYPE_LONGDOUBLE:
		t->elements[i] = &ffi_type_longdouble;
		break;
#endif

A similar inconsistency occurs on line 362. This should be changed to #ifdef HAVE_LONG_DOUBLE, else it will fail to compile on any non-windows system when HAVE_LONG_DOUBLE is undefined.

This doesn't actually come up in normal compilation on Linux, only when I was fiddling with the build system and neglected to include the proper headers. So in some sense it's developer error, but it still ought to be corrected.

@chuckadams chuckadams changed the title (ffi) fix ifdefs for non-windows systems without long double fix ifdefs for non-windows systems without long double Jul 11, 2020
@php-pulls php-pulls closed this in f06a6b4 Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants